package entities;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the employees database table.
 * 
 */
@Entity
@Table(name="employees")
@NamedQueries({
	@NamedQuery(name="findEmployeeByUsernameAndPassword", 
			query="SELECT e FROM Employee e WHERE  e.username = :usernameParam and e.password = :userpassParam"),
	@NamedQuery(name="findEmployeeByFirstAndLastName", 
			query="SELECT e FROM Employee e WHERE e.firstname = :firstnameParam and e.lastname=:lastnameParam or e.firstname = :lastnameParam and e.lastname=:firstnameParam"),
	@NamedQuery(name="getAllEmployees",	
			query="SELECT e FROM Employee e"),
	@NamedQuery(name="findAdministrator", 
			query="SELECT e FROM Employee e WHERE e.rank = :rankParam")
	
})
public class Employee implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int id;

	private String lastname;

	private String firstname;

	private String lastmedicalvisit;

	private String password;

	private String email;

	private int rank;

	private String username;
	
	private String department;
	
	private String dateofbirth;
	
	private String areaManager;
	
	private String position;
	
	private String contactpersonde;
	
	private String teamleaderro;
	
	private String empl_type;
	
	private String var_part;
	
	private Double net_salary;
	
	private String departure_date;
	
	private String employment_date;
	
	private int prosisnr;
	
	private String profile;
	
	private String selected_language;

	public Employee() {
		super();
	}
	
	public Employee(int id, String lastname, String firstname, String lastmedicalvisit, String password,
				String email, int rank, String username, String department, String dateofbirth,
				String areaManager, String position, String contactpersonde, String teamleaderro,
				String empl_type, String var_part, Double net_salary, String departure_date,
				String employment_date, int prosisnr, String profile, String selected_language){
		
		this.id = id;
		this.areaManager = areaManager;
		this.contactpersonde = contactpersonde;
		this.dateofbirth = dateofbirth;
		this.department = department;
		this.departure_date = departure_date;
		this.email = email;
		this.empl_type = empl_type;
		this.employment_date = employment_date;
		this.firstname = firstname;
		this.lastmedicalvisit = lastmedicalvisit;
		this.lastname = lastname;
		this.net_salary = net_salary;
		this.password = password;
		this.position = position;
		this.profile = profile;
		this.prosisnr = prosisnr;
		this.rank = rank;
		this.teamleaderro = teamleaderro;
		this.username = username;
		this.var_part = var_part;
		this.selected_language = selected_language;
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getFirstname() {
		return this.firstname;
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}


	public String getLastname() {
		return this.lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}


	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public int getRank() {
		return this.rank;
	}

	public void setRank(int rank) {
		this.rank = rank;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getDateofbirth() {
		return dateofbirth;
	}

	public void setDateofbirth(String dateofbirth) {
		this.dateofbirth = dateofbirth;
	}

	public String getLastmedicalvisit() {
		return lastmedicalvisit;
	}

	public void setLastmedicalvisit(String lastmedicalvisit) {
		this.lastmedicalvisit = lastmedicalvisit;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public String getAreaManager() {
		return areaManager;
	}

	public void setAreaManager(String areaManager) {
		this.areaManager = areaManager;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getContactpersonde() {
		return contactpersonde;
	}

	public void setContactpersonde(String contactpersonde) {
		this.contactpersonde = contactpersonde;
	}

	public String getTeamleaderro() {
		return teamleaderro;
	}

	public void setTeamleaderro(String teamleaderro) {
		this.teamleaderro = teamleaderro;
	}

	public String getEmpl_type() {
		return empl_type;
	}

	public void setEmpl_type(String empl_type) {
		this.empl_type = empl_type;
	}

	public String getVar_part() {
		return var_part;
	}

	public void setVar_part(String var_part) {
		this.var_part = var_part;
	}

	public Double getNet_salary() {
		return net_salary;
	}

	public void setNet_salary(Double net_salary) {
		this.net_salary = net_salary;
	}

	public String getDeparture_date() {
		return departure_date;
	}

	public void setDeparture_date(String departure_date) {
		this.departure_date = departure_date;
	}

	public String getEmployment_date() {
		return employment_date;
	}

	public void setEmployment_date(String employment_date) {
		this.employment_date = employment_date;
	}

	public int getProsisnr() {
		return prosisnr;
	}

	public void setProsisnr(int prosisnr) {
		this.prosisnr = prosisnr;
	}

	public String getProfile() {
		return profile;
	}

	public void setProfile(String profile) {
		this.profile = profile;
	}

	public String getSelected_language() {
		return selected_language;
	}

	public void setSelected_language(String selected_language) {
		this.selected_language = selected_language;
	}

}